/*jslint maxerr: 50, indent: 4, browser: true */
/*global define */

(function () {
    "use strict";

    define("array.push", ["mergeModules", "init", "array.length"], function (make) {
        var buri = make.mergeModules(arguments),
            config = {
                "compatability": {}
            },
            func = [].constructor.prototype.push,
            push;

        if (!config.compatability.all && !config.compatability["array.push"] && typeof func === "function") {
            push = function (array, element) {
                return func.call(array, element);
            };
        } else {
            push = function (array, element) {
                array[buri.array.length(array)] = element;

                return buri.array.length(array);
            };
        }

        push.init = function (options) {
            buri.init(config, options);
            buri.array.length(config);
        };

        return {
            "array": {
                "push": push
            }
        };
    });
}());
